//
//  ChartMessage.h
//  气泡
//
//  Created by zzy on 14-5-13.
//  Copyright (c) 2014年 zzy. All rights reserved.
//
typedef enum {
  
    kMessageFrom = 0, //收到的消息标志
    kMessageTo      //发送标志
 
}ChartMessageType;

typedef enum {
    kMessageText,                   //文本消息
    kMessageImage,                  //图片
    kMessageAudio,                  //音频
    kMessageVideo,                  //视频
    kMessageCustom                  //自定义
}ChatMessageStyle;


#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "IWxChatMgrChatDefs.h"

@interface ChartMessage : NSObject
@property (nonatomic,strong)NSString *fromContactID;//聊天的来自的id

@property (nonatomic,assign) ChartMessageType messageType;//消息来源
@property (nonatomic, assign) ChatMessageStyle messageStyle;//消息类型
@property (nonatomic, assign) ChatMsgState sendIsSuccess;
@property (nonatomic, copy) NSString *messageId;
@property (nonatomic, copy) NSString *icon;
@property (nonatomic, copy) NSString *time;//发送或接收的时间
@property (nonatomic, copy) NSString *showTime;//展示在页面上的时间
@property (nonatomic, copy) NSString *content;
@property (nonatomic, strong) NSNumber *indexNumber;//message 所属的行
@property (nonatomic, copy) NSDictionary *dict;
@property (nonatomic, assign) BOOL isRead;
@property (nonatomic, assign) BOOL isGroupMsg;
@property (nonatomic,strong) NSString *fromMemID;//如果是群聊 接收到的消息的成员ID

//发图片时使用
@property (nonatomic, copy) NSString *messageImageUrl;
@property (nonatomic, copy) NSString *messageImageBigUrl;
@property (nonatomic, strong) UIImage *messageImage;

//发语音时使用
@property (nonatomic, assign) NSInteger duration;
@property (nonatomic, strong) NSString *fileName;
@property (nonatomic, assign) NSInteger fileSize;

//发视频时使用
@property (nonatomic, strong) UIImage *image;

@property (nonatomic, strong) NSMutableAttributedString *attributedString;
@property (nonatomic, assign) CGFloat height;

@end
